<div class="row">
  <div class="col-xs-12">
    <div class="box">
      <div class="box-body">
        <div class="tab-content">
          <!-- 综合查询 -->
          <div class="tab-pane active" id="tab_1">
            <form class="form-inline">
              <div class="box box-default">
                <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                  <button type="button" class="btn btn-primary" (click)="showQuery()">
                        <i class="fa fa-search"></i>搜索</button>
                  <button *ngIf="_.includes(menuResourceSet,'btn-an-download')" type="button" class="btn btn-primary" (click)="attachDownloadComprehensive()">
                    <i class="fa fa-download"></i>下载</button>
                  <!-- <button type="button" href="#tab_2" class="btn btn-primary" data-toggle="tab" (click)="list(1)">受托人附件
                    <i class="fa fa-mail-forward" style="margin-left:5px"></i>
                  </button> -->
                  <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                    <i class="fa fa-minus"></i>
                  </button>
                </div>
                <div class="box-body" style="display:block">
                  <div class="form-group col-lg-12" style="margin-bottom:10px !important;padding-left:0px !important;">
                    <label>组合代码：</label>
                    <input type="text" class="form-control" name="sFullCode" id="sFundCode" [(ngModel)]="getBody.sFundCode" placeholder="组合代码">
                    <label>组合名称：</label>
                    <input type="text" class="form-control" name="sFullName" id="sFullName" [(ngModel)]="getBody.sFullName" placeholder="组合名称">
                    <label>文件名称：</label>
                    <input type="text" class="form-control" name="sAttachName" id="sAttachName" [(ngModel)]="getBody.sAttachName" placeholder="文件名称">
                    <button type="button" class="btn btn-primary" (click)="loadcheck('page')">
                      <i class="fa fa-search"></i>查询</button>
                  </div>
                </div>
              </div>
            </form>

            <div class="box-body" style="padding-left:0px;padding-right:0px;">
              <div style="overflow-x:scroll;width:100%">
                <table id="fixed-table" class="table table-bordered table-hover table-keep-line table-striped">
                  <thead>
                    <tr>
                      <th class="width-5">
                        <div class="checkbox checkbox-primary">
                          <input type="checkbox" id="checkboxAll" [(ngModel)]="isCheckedAllComprehensive" (ngModelChange)="checkedAllComprehensive()">
                          <label></label>
                        </div>
                      </th>
                      <th class="width-15" (click)="orderData('sFundCode',dataListComprehensive,'dataListComprehensive')">组合代码<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('sFullName',dataListComprehensive,'dataListComprehensive')">组合名称<i class="fa fa-sort"></i></th>
                      <!-- <th class="width-10">组合类型</th> -->
                      <th class="width-20" (click)="orderData('sAttachName',dataListComprehensive,'dataListComprehensive')">文件名称<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('sLinkPrincipal',dataListComprehensive,'dataListComprehensive')">受托人<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('dCreateTime',dataListComprehensive,'dataListComprehensive')">上传时间<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('sCreator',dataListComprehensive,'dataListComprehensive')">上传人<i class="fa fa-sort"></i></th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr *ngFor="let item of dataListComprehensive;">
                      <td class="width-5">
                        <div class="checkbox checkbox-primary">
                          <input type="checkbox" id="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAllComprehensive()">
                          <label></label>
                        </div>
                      </td>
                      <td class="width-15 short_name" [attr.title]="item.sFundCode">{{item.sFundCode}}</td>
                      <td class="width-15 short_name" [attr.title]="item.sFullName">{{item.sFullName}}</td>
                      <!-- <td class="short_name" [attr.title]="item.sFundTypeName">{{item.sFundTypeName}}</td> -->
                      <td class="width-20 short_name" [attr.title]="item.sAttachName">{{item.sAttachName}}</td>
                      <td class="width-15 short_name" [attr.title]="item.sLinkPrincipal">{{item.sLinkPrincipal}}</td>
                      <td class="width-15 short_name" [attr.title]="item.dCreateTime">{{item.dCreateTime}}</td>
                      <td class="width-15 short_name" [attr.title]="item.sCreator">{{item.sCreator}}</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>

            <div class="box-footer clearfix">
              <app-pagination [currentPageNum]="listPageInfoComprehensive.currentPageNum" [pagesShow]="" [totalPages]="listPageInfoComprehensive.totalPages"
                (pageChanged)="listPageNavigationComprehensive($event)">
                <div class="pull-left pagination-detail" data-pagination-additional="true">
                  <span class="pagination-info">当前显示第{{listPageInfoComprehensive.startRow}}到第{{listPageInfoComprehensive.endRow}}条，总共{{listPageInfoComprehensive.total}}条，</span>
                  <span class="page-list"> 每页记录
                    <span class="btn-group dropup">
                      <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <span class="page-size">{{listPageInfoComprehensive.pageSize}}</span>
                  <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu" role="menu">
                    <li *ngFor="let i of listPageInfoComprehensive.pageList" role="menuitem" [class.active]="listPageInfoComprehensive.pageSize === i"
                      (click)="listpageSizeChangeComprehensive(i)">
                      <a>{{i}}</a>
                    </li>
                  </ul>
                  </span>条
                  </span>
                </div>
              </app-pagination>
            </div>
          </div>
          <!-- 受托人附件查询 -->
          <div class="tab-pane" id="tab_2">
            <form class="form-inline">
              <div class="box box-default">
                <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                  <button *ngIf="_.includes(menuResourceSet,'btn-an-download')" type="button" class="btn btn-primary" (click)="attachDownload()">
                          <i class="fa fa-download"></i>下载</button>
                  <button type="button" href="#tab_1" class="btn btn-primary" data-toggle="tab" (click)="listComprehensive(1)">
                              <i class="fa fa-mail-reply" style="margin-right:5px"></i>综合查询</button>
                  <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                          <i class="fa fa-minus"></i></button>
                </div>
                <div class="box-body" style="display:block">
                  <div class="form-group col-lg-12" style="padding-left:0px !important;">
                    <label class="control-label">文件名称：</label>
                    <input type="text" class="form-control" name="sAttachName" [(ngModel)]="getListPost.sAttachName" placeholder="文件名称">
                    <label>受托人：</label>
                    <select class="form-control" id="sLinkPrincipalNoSelecteds" name="sLinkPrincipalNo" [(ngModel)]="getListPost.sLinkPrincipalNo">
                    <option [value]="''" selected="selected">全部</option>
                    <option [value]="item.sItemKey" *ngFor="let item of oldageLinkPrincipal.LINK_PRINCIPAL_NO">{{item.sItemValue}}</option>
                    </select>
                    <label class="control-label">附件类型：</label>
                    <select class="form-control" id="sProductTypeSelecteds" name="sAttachCode" [(ngModel)]="getListPost.sAttachCode" name="fundType">
                      <option [value]="''" selected="selected">全部</option>
                      <option [value]="item.sAttachTypeCode" *ngFor="let item of oldageAttachConf">{{item.sAttachTypeName}}</option>
                    </select>
                    <button type="button" class="btn btn-primary" (click)="list()">
                      <i class="fa fa-search"></i>查询</button>
                  </div>
                </div>
              </div>
            </form>

            <div class="box-body" style="padding-left:0px;padding-right:0px;">
              <div style="overflow-x:scroll;width:100%">
                <table id="list_table1" class="table table-bordered table-hover table-keep-line table-striped">
                  <thead>
                    <tr>
                      <th class="width-5">
                        <div class="checkbox checkbox-primary">
                          <input type="checkbox" id="checkboxAllC" [(ngModel)]="isCheckedAll" (ngModelChange)="checkedAll()">
                          <label></label>
                        </div>
                      </th>
                      <th class="width-50" (click)="orderData('sAttachName',dataList,'dataList')">文件名称<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('sLinkPrincipal',dataList,'dataList')">受托人<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('dCreateTime',dataList,'dataList')">上传时间<i class="fa fa-sort"></i></th>
                      <th class="width-15" (click)="orderData('sCreator',dataList,'dataList')">上传人<i class="fa fa-sort"></i></th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr *ngFor="let item of dataList;">
                      <td>
                        <div class="checkbox checkbox-primary">
                          <input type="checkbox" id="checkbox2" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                          <label></label>
                        </div>
                      </td>
                      <td class="short_name" [attr.title]="item.sAttachName">{{item.sAttachName}}</td>
                      <td class="short_name" [attr.title]="item.sLinkPrincipal">{{item.sLinkPrincipal}}</td>
                      <td class="short_name" [attr.title]="item.dCreateTime">{{item.dCreateTime}}</td>
                      <td class="short_name" [attr.title]="item.sCreator">{{item.sCreator}}</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>

            <div class="box-footer clearfix">
              <app-pagination [currentPageNum]="listPageInfo.currentPageNum" [pagesShow]="" [totalPages]="listPageInfo.totalPages" (pageChanged)="listPageNavigation($event)">
                <div class="pull-left pagination-detail" data-pagination-additional="true">
                  <span class="pagination-info">当前显示第{{listPageInfo.startRow}}到第{{listPageInfo.endRow}}条，总共{{listPageInfo.total}}条，</span>
                  <span class="page-list"> 每页记录
                  <span class="btn-group dropup">
                      <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <span class="page-size">{{listPageInfo.pageSize}}</span>
                  <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu" role="menu">
                    <li *ngFor="let i of listPageInfo.pageList" role="menuitem" [class.active]="listPageInfo.pageSize === i" (click)="listpageSizeChange(i)">
                      <a>{{i}}</a>
                    </li>
                  </ul>
                  </span>条
                  </span>
                </div>
              </app-pagination>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 搜索modal -->
<div class="modal modal-open modal-detail" id="annuityEnclosureQuery">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
        <h4 class="modal-title">搜索</h4>
      </div>
      <div class="modal-body" style="padding-top:10px;">
        <form class="form-horizontal" style="padding-top:5px">
          <div class="form-group">
            <label class="col-lg-2 text-right">组合代码：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="postBody.sFundCode" name="sFundCode">
            </div>
            <div class="col-lg-1"></div>
            <label class="col-lg-2 text-right">组合名称：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="postBody.sFullName" name="sFullName">
            </div>
          </div>

          <div class="form-group">
            <label class="col-lg-2 text-right">附件类型：</label>
            <div class="col-lg-3">
              <select class="form-control" id="sProductTypeSelected" [(ngModel)]="postBody.sAttachType" name="sProductType">
                      <option [value]="''">全部</option>
                      <option [value]="item.sAttachTypeCode" *ngFor="let item of oldageAttachConf">{{item.sAttachTypeName}}</option>
                    </select>
            </div>
            <div class="col-lg-1"></div>
            <label class="col-lg-2 text-right">文件名称：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="postBody.sAttachName" name="sAttachName">
            </div>
          </div>

          <div class="form-group">
            <label class="col-lg-2 text-right">上传时间从：</label>
            <div class="col-lg-3">
              <div class="input-group date form_datetime">
                <span class="input-group-addon">
                      <i class="fa fa-calendar"></i>
                    </span>
                <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="postBody.updateLoadDate"
                  mwlFlatpickr [ngModelOptions]="{standalone: false}" name="updateLoadDate">
              </div>
            </div>
            <div class="col-lg-1"></div>
            <label class="col-lg-2 text-right">到：</label>
            <div class="col-lg-3">
              <div class="input-group date form_datetime">
                <span class="input-group-addon">
                      <i class="fa fa-calendar"></i>
                    </span>
                <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="postBody.updateLoadEnd"
                  mwlFlatpickr [ngModelOptions]="{standalone: false}" name="updateLoadEnd">
              </div>
            </div>
          </div>

          <div class="form-group">
            <label class="col-lg-2 text-right">上传人：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="postBody.sCreator" name="sCreator">
            </div>
            <div class="col-lg-1"></div>
            <label class="col-lg-2 text-right">受托人：</label>
            <div class="col-lg-3">
              <select class="form-control" id="sLinkPrincipalNoSelected" [(ngModel)]="postBody.sLinkPrincipal" name="sLinkPrincipalNo">
                    <option [value]="''" >全部</option>
                    <option [value]="item.sItemKey" *ngFor="let item of distionary.LINK_PRINCIPAL_NO">{{item.sItemValue}}</option>
                    </select>
            </div>
          </div>

          <div class="form-group">
            <label class="col-lg-2 text-right">附件说明：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="postBody.sAttachDesc" name="sAttachDesc">
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button class="btn btn-primary pull-right" (click)="resetQuery()"><i class="fa fa-circle-o-notch"></i>重置</button>
        <button class="btn btn-primary pull-right" (click)="loadcheck('query')"><i class="fa fa-search"></i>查询</button>
        <button class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>